import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
//路由懒加载
const Index = (resolve) => {
  import('components/index/index').then((module) => {
    resolve(module)
  })
}
const Info = (resolve) => {
  import('components/info/info').then((module) => {
    resolve(module)
  })
}
const InfoDetail = (resolve) => {
  import('components/info-detail/info-detail').then((module) => {
    resolve(module)
  })
}
const IndustryAlliance = (resolve) => {
  import('components/industry-alliance/industry-alliance').then((module) => {
    resolve(module)
  })
}
const TankTown = (resolve) => {
  import('components/tank-town/tank-town').then((module) => {
    resolve(module)
  })
}
const TankApp = (resolve) => {
  import('components/tank-app/tank-app').then((module) => {
    resolve(module)
  })
}
const PlanTown = (resolve) => {
  import('components/plan-town/plan-town').then((module) => {
    resolve(module)
  })
}
const PlanCountryside = (resolve) => {
  import('components/plan-countryside/plan-countryside').then((module) => {
    resolve(module)
  })
}
const PlanEstate = (resolve) => {
  import('components/plan-estate/plan-estate').then((module) => {
    resolve(module)
  })
}
const PlanTour = (resolve) => {
  import('components/plan-tour/plan-tour').then((module) => {
    resolve(module)
  })
}
const PlanPark= (resolve) => {
  import('components/plan-park/plan-park').then((module) => {
    resolve(module)
  })
}
const Capital = (resolve) => {
  import('components/capital/capital').then((module) => {
    resolve(module)
  })
}
const BusinessTown = (resolve) => {
  import('components/business-town/business-town').then((module) => {
    resolve(module)
  })
}
const BusinessSecret= (resolve) => {
  import('components/business-secret/business-secret').then((module) => {
    resolve(module)
  })
}
const BusinessBlock = (resolve) => {
  import('components/business-block/business-block').then((module) => {
    resolve(module)
  })
}
const AboutBrief = (resolve) => {
  import('components/about-brief/about-brief').then((module) => {
    resolve(module)
  })
}
const AboutContact = (resolve) => {
  import('components/about-contact/about-contact').then((module) => {
    resolve(module)
  })
}


export default new Router({
  routes: [
    {
      path: '/',
      redirect:'/index'
    },
    {
        path:'/index',
        component:Index,
        meta:{
            title:'首页'
        }
    },
    {
        path:'/info',
        component:Info,
        meta:{
            title:'资讯'
        }
    },
    {
        path:'/info-detail',
        component:InfoDetail
    },
    {
        path:'/about-brief',
        component:AboutBrief
    },
    {
        path:'/about-contact',
        component:AboutContact
    },
    {
        path:'/business-town',
        component:BusinessTown
    },
    {
        path:'/business-block',
        component:BusinessBlock
    },
    {
        path:'/business-secret',
        component:BusinessSecret
    },
    {
        path:'/industry-alliance',
        component:IndustryAlliance
    },
    {
        path:'/plan-countryside',
        component:PlanCountryside
    },
    {
        path:'/plan-estate',
        component:PlanEstate
    },
    {
        path:'/plan-park',
        component:PlanPark
    },
    {
        path:'/plan-tour',
        component:PlanTour
    },
    {
        path:'/plan-town',
        component:PlanTown
    },
    {
        path:'/tank-app',
        component:TankApp
    },
    {
        path:'/tank-town',
        component:TankTown
    },
    {
        path:'/capital',
        component:Capital
    },

  ]
})
